<?php
App::uses('AppModel', 'Model');
/**
 * MobileDetail Model
 *
 * @property Modell $Modell
 * @property ScreenType $ScreenType
 * @property ScreenStandard $ScreenStandard
 * @property ScreenResolution $ScreenResolution
 * @property ScreenSize $ScreenSize
 * @property Chipset $Chipset
 * @property Gp $Gp
 * @property CardSlotType $CardSlotType
 * @property BatteryType $BatteryType
 */
class MobileDetail extends AppModel {
    public $validate = array(
        'screen_color_count' => array(
            'maxLength' => array(
                'rule' => array('maxLength',10),
                //'message' => 'Your custom message here',
                'allowEmpty' => true,
                'required' => false,
                //'last' => false, // Stop validation after this rule
                //'on' => 'create', // Limit validation to 'create' or 'update' operations
            ),
            'naturalNumber' => array(
                'rule' => array('naturalNumber'),
                //'message' => 'Your custom message here',
                //'allowEmpty' => false,
                //'required' => false,
                //'last' => false, // Stop validation after this rule
                //'on' => 'create', // Limit validation to 'create' or 'update' operations
            ),
        ),
        'touch_description' => array(
            'maxLength' => array(
                'rule' => array('maxLength',500),
                //'message' => 'Your custom message here',
                'allowEmpty' => true,
                'required' => false,
                //'last' => false, // Stop validation after this rule
                //'on' => 'create', // Limit validation to 'create' or 'update' operations
            ),
        ),
        'camera_feature' => array(
            'maxLength' => array(
                'rule' => array('maxLength',500),
                //'message' => 'Your custom message here',
                'allowEmpty' => true,
                'required' => false,
                //'last' => false, // Stop validation after this rule
                //'on' => 'create', // Limit validation to 'create' or 'update' operations
            ),
        ),
        'cpu_speed' => array(
            'maxLength' => array(
                'rule' => array('maxLength',30),
                //'message' => 'Your custom message here',
                'allowEmpty' => true,
                'required' => false,
                //'last' => false, // Stop validation after this rule
                //'on' => 'create', // Limit validation to 'create' or 'update' operations
            ),
        ),
        'ram' => array(
            'maxLength' => array(
                'rule' => array('maxLength',20),
                //'message' => 'Your custom message here',
                'allowEmpty' => true,
                'required' => false,
                //'last' => false, // Stop validation after this rule
                //'on' => 'create', // Limit validation to 'create' or 'update' operations
            ),
            'naturalNumber' => array(
                'rule' => array('naturalNumber'),
                //'message' => 'Your custom message here',
                //'allowEmpty' => false,
                //'required' => false,
                //'last' => false, // Stop validation after this rule
                //'on' => 'create', // Limit validation to 'create' or 'update' operations
            ),
        ),
        'internal_storage' => array(
            'maxLength' => array(
                'rule' => array('maxLength',20),
                //'message' => 'Your custom message here',
                'allowEmpty' => true,
                'required' => false,
                //'last' => false, // Stop validation after this rule
                //'on' => 'create', // Limit validation to 'create' or 'update' operations
            ),
            'naturalNumber' => array(
                'rule' => array('naturalNumber'),
                //'message' => 'Your custom message here',
                //'allowEmpty' => false,
                //'required' => false,
                //'last' => false, // Stop validation after this rule
                //'on' => 'create', // Limit validation to 'create' or 'update' operations
            ),
        ),
        'storage_up_to' => array(
            'maxLength' => array(
                'rule' => array('maxLength',20),
                //'message' => 'Your custom message here',
                'allowEmpty' => true,
                'required' => false,
                //'last' => false, // Stop validation after this rule
                //'on' => 'create', // Limit validation to 'create' or 'update' operations
            ),
            'naturalNumber' => array(
                'rule' => array('naturalNumber'),
                //'message' => 'Your custom message here',
                //'allowEmpty' => false,
                //'required' => false,
                //'last' => false, // Stop validation after this rule
                //'on' => 'create', // Limit validation to 'create' or 'update' operations
            ),
        ),
        'battery_capacity' => array(
            'maxLength' => array(
                'rule' => array('maxLength',20),
                //'message' => 'Your custom message here',
                'allowEmpty' => true,
                'required' => false,
                //'last' => false, // Stop validation after this rule
                //'on' => 'create', // Limit validation to 'create' or 'update' operations
            ),
            'naturalNumber' => array(
                'rule' => array('naturalNumber'),
                //'message' => 'Your custom message here',
                //'allowEmpty' => false,
                //'required' => false,
                //'last' => false, // Stop validation after this rule
                //'on' => 'create', // Limit validation to 'create' or 'update' operations
            ),
        ),

        'sim_count' => array(
            'maxLength' => array(
                'rule' => array('maxLength', 20),
                //'message' => 'Your custom message here',
                'allowEmpty' => true,
                'required' => false,
                //'last' => false, // Stop validation after this rule
                //'on' => 'create', // Limit validation to 'create' or 'update' operations
            ),
            'naturalNumber' => array(
                'rule' => array('naturalNumber'),
                //'message' => 'Your custom message here',
                'allowEmpty' => true,
                'required' => false,
                //'last' => false, // Stop validation after this rule
                //'on' => 'create', // Limit validation to 'create' or 'update' operations
            ),
        ),
        'three_description' => array(
            'maxLength' => array(
                'rule' => array('maxLength',500),
                //'message' => 'Your custom message here',
                'allowEmpty' => true,
                'required' => false,
                //'last' => false, // Stop validation after this rule
                //'on' => 'create', // Limit validation to 'create' or 'update' operations
            ),
        ),
        'four_description' => array(
            'maxLength' => array(
                'rule' => array('maxLength'),500,
                //'message' => 'Your custom message here',
                'allowEmpty' => true,
                'required' => false,
                //'last' => false, // Stop validation after this rule
                //'on' => 'create', // Limit validation to 'create' or 'update' operations
            ),
        ),
        'gps_description' => array(
            'maxLength' => array(
                'rule' => array('maxLength',500),
                //'message' => 'Your custom message here',
                'allowEmpty' => true,
                'required' => false,
                //'last' => false, // Stop validation after this rule
                //'on' => 'create', // Limit validation to 'create' or 'update' operations
            ),
        ),
        'bluetooth_description' => array(
            'maxLength' => array(
                'rule' => array('maxLength',500),
                //'message' => 'Your custom message here',
                'allowEmpty' => true,
                'required' => false,
                //'last' => false, // Stop validation after this rule
                //'on' => 'create', // Limit validation to 'create' or 'update' operations
            ),
        ),
    );


	//The Associations below have been created with all possible keys, those that are not needed can be removed

/**
 * belongsTo associations
 *
 * @var array
 */
	public $belongsTo = array(
		'Modell' => array(
			'className' => 'Modell',
			'foreignKey' => 'modell_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
		'ScreenType' => array(
			'className' => 'ScreenType',
			'foreignKey' => 'screen_type_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
		'ScreenStandard' => array(
			'className' => 'ScreenStandard',
			'foreignKey' => 'screen_standard_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
		'ScreenResolution' => array(
			'className' => 'ScreenResolution',
			'foreignKey' => 'screen_resolution_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
		'ScreenSize' => array(
			'className' => 'ScreenSize',
			'foreignKey' => 'screen_size_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
		'Chipset' => array(
			'className' => 'Chipset',
			'foreignKey' => 'chipset_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
		'Gp' => array(
			'className' => 'Gp',
			'foreignKey' => 'gp_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
		'CardSlotType' => array(
			'className' => 'CardSlotType',
			'foreignKey' => 'card_slot_type_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
		'BatteryType' => array(
			'className' => 'BatteryType',
			'foreignKey' => 'battery_type_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		)
	);
}
